<!DOCTYPE html>
<html>
    <body>
        <h1>数组</h1>
        <p>第一个数组<span id="arr1"></span></p>
        <button onclick="fun1()">点我</button>
        <p>第二个数组<span id="arr2"></span></p>
        <p>第三个数组<span id="arr3"></span></p>

        <script>
            function fun1(){
                var arr1 = new Array();
                arr1 [0] = "a";
                arr1 [1] = "b";
                arr1 [2] = "c";
                for(var i =0;i<arr1.length;i++){
                    document.getElementById("arr1").innerHTML = arr1[i]
                }
            }
        </script>
    </body>
</html>